//
//  ZZMediator+ZZModuleAActions.m
//  ZZKitDemo
//
//  Created by hfzhangzhang on 2018/8/14.
//  Copyright © 2018年 hfzhangzhang. All rights reserved.
//

#import "ZZMediator+ZZModuleAActions.h"

NSString * const kCTMediatorTargetA = @"A";
NSString * const kCTMediatorActionShowAlert = @"showAlert";

@implementation ZZMediator (ZZModuleAActions)
- (void)ZZMediator_showAlertWithMessage:(NSString *)message cancelAction:(void(^)(NSDictionary *info))cancelAction confirmAction:(void(^)(NSDictionary *info))confirmAction
{
    NSMutableDictionary *paramsToSend = [[NSMutableDictionary alloc] init];
    if (message) {
        paramsToSend[@"message"] = message;
    }
    if (cancelAction) {
        paramsToSend[@"cancelAction"] = cancelAction;
    }
    if (confirmAction) {
        paramsToSend[@"confirmAction"] = confirmAction;
    }
    [self zz_performTarget:kCTMediatorTargetA
                 action:kCTMediatorActionShowAlert
                 params:paramsToSend
      shouldCacheTarget:NO];
}
@end
